18. Exercise: Add Polish
Add Polish
Add Polish
SOLUTION:
- Add error text string
- Wrap the ScrollView with a FrameLayout
- Insert an error TextView into the FrameLayout set to our new text string
- Add helper functions in MainActivity to swap the visibility of JsonData and the ErrorView.
- Call the error view on null or empty data.
- Add a progressBar to the FrameLayout
- Show the progressBar during loading and hide it afterwards